
<html><body>
<script type="text/javascript">
//禁止输入中文汉字
	function isSpecialChar(id){
		var iptData=document.getElementById(id);
		if(iptData.value.match(/[^\x00-\xff]/ig)){
		iptData.value=iptData.value.replace(/[^\x00-\xff]/ig,"");
		}
	}
</script>
	 <style type="text/css">
* {
    margin: 0;
    padding: 0;
    border: 0;

    vertical-align: baseline;
    text-align:left;
}
* {margin:0; padding:0;}

html {
	font: 90%/1.3 arial,sans-serif;
	padding-top:60px;
	padding-left:120px;

	
}

#loginform{
	background:#fff;
	padding:1em;
	border:1px solid #eee;
}

.login {
	background:url(images/user.gif) no-repeat 95% 1em;
}

fieldset div {
	margin:0.3em 0;
	clear:both;
}
form {
	margin:1em;
	width:27em;
}
label {
	float:left;
	width:10em;
	text-align:right;
	margin-right:1em;
}
legend {
	color:#0b77b7;
	font-size:1.2em;
}
legend span {
	width:10em;
	text-align:right;
}
input {
	padding:0.15em;
	width:10em;
	border:1px solid #ddd;
	background:#fafafa;
	font:bold 0.95em arial, sans-serif;
	-moz-border-radius:0.4em;
	-khtml-border-radius:0.4em;
}
input:hover, input:focus {
	border-color:#c5c5c5;
	background:#f6f6f6;
} 
fieldset {
	border:1px solid #ddd;
	padding:0 0.5em 0.5em;
}

#loginform input.default {
	color:#bbb;
}
center{
	background-color:#fafafa;
}
li{
	font-size:1.6em
}

  </style>
  
<table style="display:block;">
	<tr>
			 <td>
	  <div style="display:block;padding:90px;">
	  	
	  	<strong style="font-size:2.0em;">菲雪洛琳backoffice系统</strong>
	  	<br>
  	<ul>
  		<br>
  		<li>
  			》财务管理
  		</li>
  		<br>
  		<li>
  			》前台营销
  		</li>
  		<br>
  		<li>
  			》后台调配
  		</li>
  		
  	</ul>
  </div>
  </td>
		<td>
				<?php
	//print_r($_GET);'
	
	if(isset($_GET['stat'])){
		
			if($_GET['stat']=='error'&&$_GET['error']=='password'){
		?>
		<div class="isa_error">
			<h4>登陆失败：</h4>密码不匹配
		</div>
		<?php
			}elseif($_GET['stat']=='error'&&$_GET['error']=='missing'){
		?>
		<div class="isa_error">
			<h4>登陆失败：</h4>帐户不存在
		</div>
		
			<?php
			}elseif($_GET['stat']=='error'&&$_GET['error']=='blocked'){
		?>
		<div class="isa_error">
			<h4>登陆失败:</h4>帐户被禁用
		</div>
		<?php
		}
	}
		?>
	<form id="loginform" method="post" action="api/" >
			<input name="action" type="hidden" id="action" value='checklogin'>

		<p>珠海菲雪洛琳服装有限公司backoffice</p>
		<br>
		<fieldset class="login" style="padding-top:10px">
			<legend>用户登陆表格</legend>
			
			<div>
				<label for="username">用户名</label> <input type="text" id="username" name="username" onkeyup="isSpecialChar(this.id)">
			</div>
			<br>
			<div>
				<label for="password">密码</label> <input type="password" id="password" name="password">
			</div>
			
			
		</fieldset>
		<br>
		<?php
		$ip="" ;
			if ( isset($_SERVER["REMOTE_ADDR"]) )    { 
			    $ip= $_SERVER["REMOTE_ADDR"];
			} else if ( isset($_SERVER["HTTP_X_FORWARDED_FOR"]) )    { 
			   $ip= $_SERVER["HTTP_X_FORWARDED_FOR"]; 
			} else if ( isset($_SERVER["HTTP_CLIENT_IP"]) )    { 
			    $ip= $_SERVER["HTTP_CLIENT_IP"]; 
			} 
			echo "<input type='hidden' id='ip' name='ip' value='$ip'>";
		?>
		<script>
				document.write(
					"<input type='hidden' id='browser' name='browser' value='"+browserName+" "+majorVersion+"'>"
				   +"<input type='hidden' id='os' name='os' value='"+OSName+"'>"
				);
		</script>
		<input type="submit" id="submit" name="gender" value="login"> 
		
	</form>

	 </td>

  </tr>
  		</table>
<?php

if(isset($_GET['error'])&&($_GET['error']=='login')){
	echo "<p>密码或用户名错误</p>";
 }
?>

</body>
</html>